#include "Button.h"
#include "Engine.h"

namespace SypX
{

	Button::Button(float x, float y, float width, float height, float depth, Texture* texture):GuiComponent(width, height)
	{		
		mi->setPosition(SypX::Vec3(x,y,depth));		

		this->initAsQuad(width, height);
		if(texture)
		{
			this->setTexture(texture);
		}


	}

	Button::~Button(void)
	{
	}

	void Button::draw()
	{
		SypX::Engine::getSingleton()->getRenderer()->drawMesh(mi);
	}
}